import Http from '@/http';

export function listApi() {
    return Http.get('projectCategory/list')
}

export function saveApi(params:any) {
    return params.id ? Http.put('projectCategory/edit/' + params.id, params) : Http.post('projectCategory/add', params)
}
export function deleteApi(id) {
    return Http.delete('projectCategory/delete/' + id)
}

export function uploadApi(icon:File) {
    const formData = new FormData()
    formData.append('icon', icon)
    return Http.post('projectCategory/icon', formData)
}